/*
 * @Author: your name
 * @Date: 2021-12-09 14:06:58
 * @LastEditTime: 2021-12-09 14:29:48
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \12.9work\test_one\middlewares\timeTigger.js
 */
module.exports=()=>{
    return async(ctx,next)=>{
        let startTime=new Date().getTime()
        await next()
        let endTime=new Date().getTime()
        let Time=(endTime-startTime)/1000
        console.log(`本次请求的地址是${ctx.url},请求的方式为${ctx.method},请求时间为${Time}s`)
    }
}